package br.com.aula;

import javax.swing.JOptionPane;

public class Recursividade {

	public static void main(String[] args) {
		for(long i = 0; i <= 10; i++){
			JOptionPane.showMessageDialog(null, i + "! = "+fatorial(i));
    		
		}
	}

	public static long fatorial(long num){
		if(num <= 1)
			return (1);
		else
		   return (num * fatorial(num -1));
	}
}
